<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<jsp:include page="/WEB-INF/views/commons/center_top.jsp"/>
<link rel="stylesheet" href="/static/css/system/menu/index.css" />

<div class="contBox clear no-padding-left">
	<div class="col-sm-3">
		<div class="widget-box">
			<div class="widget-header header-color-blue">
				<span>菜单列表</span>
				<div class="widget-toolbar no-border">
					<div class="btn-group">
							<button class="btn btn-${btn_color} btn-sm" id="menuAdd">
								<i class="icon-plus-sign bigger-150"></i>
								<s:message code="add"/>
							</button>
						<button class="btn btn-${btn_color} btn-sm" id="menuDelete">
							<i class="icon-trash bigger-150"></i>
							<s:message code="delete"/>
						</button>
					</div>
				</div>
			</div>
			<div class="widget-body">
				<div class="widget-main padding-8">
					<ul id="tree" class="ztree"></ul>
				</div>
			</div>
		</div>
	</div>
	
	<div class="col-sm-9 row no-padding-right">
		<div class="widget-box">
			<div class="widget-header header-color-blue">
				<span>菜单编辑</span>
				<div class="widget-toolbar no-border">
					<div class="btn-group">
						<button class="btn btn-${btn_color} btn-sm" id="menuSave">
							<i class="icon-save bigger-150"></i>
							<s:message code="save"/>
						</button>
					</div>
				</div>
			</div>
			<div class="widget-body">
				<div class="widget-main padding-8">
					<div id="tree_info" class="tree-unselectable clear">
						<form class="form-horizontal" role="form" id="validForm">
							<input name="id" type="hidden" value=""/>
							<div class="form-group col-sm-6">
								<label class="col-sm-2 control-label no-padding-right no-padding-left" for="form-field-1"> 菜单名称 </label>
								<div class="col-sm-10">
									<input name="name" class="col-xs-12 required" type="text" placeholder="Menu Name">
								</div>
							</div>
							<div class="form-group col-sm-6">
								<label class="col-sm-2 control-label no-padding-right no-padding-left" for="form-field-1"> 菜单图标 </label>
								<div class="col-sm-10">
									<select name="icon" class="col-xs-12 icno-data no-padding">
										<option value="">&nbsp;</option>
										<c:forEach items="${dicts}" var="dict">
											<option value="${dict.code}">${dict.name}</option>
										</c:forEach>
									</select>
								</div>
							</div>
							<div class="form-group col-sm-6">
								<label class="col-sm-2 control-label no-padding-right no-padding-left" for="form-field-1"> 菜单权限 </label>
								<div class="col-sm-10">
									<input name="permission" class="col-xs-12 required" type="text" placeholder="Menu Permission">
								</div>
							</div>
							<div class="form-group col-sm-6">
								<label class="col-sm-2 control-label no-padding-right no-padding-left" for="form-field-1"> 父级菜单 </label>
								<div class="col-sm-10">
									<select id="parentId" name="parent.id" class="col-xs-12 no-padding">
										<option value="">&nbsp;</option>
										<c:forEach items="${menus}" var="menu">
											<option value="${menu.id}">${menu.name}</option>
										</c:forEach>
									</select>
								</div>
							</div>
							<div class="form-group col-sm-6">
								<label class="col-sm-2 control-label no-padding-right no-padding-left" for="form-field-1"> 访问地址  </label>
								<div class="col-sm-10">
									<input name="url" class="col-xs-12" type="text" placeholder="Url">
								</div>
							</div>
							<div class="form-group col-sm-6">
								<label class="col-sm-2 control-label no-padding-right no-padding-left" for="form-field-1"> 序号  </label>
								<div class="col-sm-10">
									<input name="sort" class="col-xs-12 number" type="text" placeholder="sort">
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="/static/module/system/menu/index.js"></script>
<jsp:include page="/WEB-INF/views/commons/center_bottom.jsp"/>